package com.zg.scf.domain.req.plan;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zg.common.core.req.AddReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * DESCRIPTION
 *
 * @author zhanfeng.liang
 * @since 2025-07-14
 */

@Data
@ApiModel(value = "港口计划AddReq")
public class PortPlanAddReq extends AddReq {

    @ApiModelProperty(value = "计划号", example = "P20250719001", notes = "计划的唯一业务编号")
    @NotEmpty(message = "计划号不能为空")
    private String planNo;

    @ApiModelProperty(value = "用户名称", example = "XX公司", notes = "用户名称")
    @NotEmpty(message = "用户名称不能为空")
    private String userName;          // 用户（企业名称）

    @ApiModelProperty(value = "矿点名称", example = "XX矿点", notes = "矿点名称")
    @NotEmpty(message = "矿点名称不能为空")
    private String minePoint;       // 矿厂

    @ApiModelProperty(value = "煤种", example = "焦炭", notes = "煤种")
    @NotEmpty(message = "煤种不能为空")
    private String coalType;          // 煤种

    @ApiModelProperty(value = "计划执行日期", example = "2025-07-20", notes = "计划开始执行的日期")
    @NotNull(message = "计划执行日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd",shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    private Date planDate;         // 计划日期
    /**
     * 吨数
     */
    @ApiModelProperty(value = "计划吨数", example = "500.0", notes = "计划总吨数，可保留小数")
    @NotNull(message = "计划吨数不能为空")
    private BigDecimal quantity;

    /**
     * 下达日期
     */
    @ApiModelProperty(value = "计划下达日期", example = "2025-07-19", notes = "计划正式下达的日期")
    @NotNull(message = "计划下达日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd",shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    private Date issueDate;
}
